<?php
	/**
	 * URL class
	 *
	 */
	class URL
	{		
		/**
		* Gets url from $_SERVER variables
		*
		* @return string $url url
		*/	
		function GetURL()
		{	

			if (isset($_SERVER['SCRIPT_URL']))
			{
				$url = $_SERVER['SCRIPT_URL'];
			}
			elseif (isset($_SERVER['REDIRECT_URL']))
			{
				$url = $_SERVER['REDIRECT_URL'];
			}
			elseif (isset($_SERVER['REQUEST_URI']))
			{
				$url = $_SERVER['REQUEST_URI'];
			}
			return $url;
		}
	}
?>